/*
 * @Descripttion: 销售退货接口
 * @version:
 * @Author: cxguo
 * @Date: 2019-08-02 15:03:05
 * @LastEditors: cxguo
 * @LastEditTime: 2019-10-15 16:43:09
 */
import axios from '@/utils/request'
const baseUrl = '/admin/sale_return_list'

/**
 * 添加销售退货单
 * @param {*} params
 */
export function saveData(params) {
  return axios.request({
    url: `${baseUrl}/save`,
    method: 'post',
    data: params
  })
}

export function delData(params) {
  return axios.request({
    url: `${baseUrl}/delete`,
    method: 'post',
    data: params
  })
}

export function getSaleReturnNumber(params) {
  return axios.request({
    url: `${baseUrl}/get_billnumber`,
    method: 'post',
    data: params
  })
}
/**
 * 查询销售退货单据
 * @param {*} params
 */
export function listBillData(params) {
  return axios.request({
    url: `${baseUrl}/list`,
    method: 'post',
    data: params
  })
}

/**
 * 根据Id获取退货单详情
 * @param {id} params
 */
export function getDataByBillId(params) {
  return axios.request({
    url: `${baseUrl}/getdata_byid`,
    method: 'post',
    data: params
  })
}

/**
 * 根据退货单id查询所有进货单商品
 * @param {*} params
 */
export function listGoodsByBillId(params) {
  return axios.request({
    url: `${baseUrl}/listgoods_bybillid`,
    method: 'post',
    data: params
  })
}
